package com.turing.service.impl;

import com.turing.domain.SupplierInfo;
import com.turing.mapper.SupplierInfoMapper;
import com.turing.service.ISupplierInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class SupplierInfoServiceImpl implements ISupplierInfoService {

    @Autowired
    private SupplierInfoMapper supplierInfoMapper;

    @Override
    public List<SupplierInfo> selectAll() {
        return supplierInfoMapper.selectList();
    }

    @Override
    public SupplierInfo selectById(Long id) {
        return supplierInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(SupplierInfo supplierInfo) {
        return supplierInfoMapper.insertSelective(supplierInfo);
    }

    @Override
    public int updateById(SupplierInfo supplierInfo) {
        return supplierInfoMapper.updateByPrimaryKeySelective(supplierInfo);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return supplierInfoMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<SupplierInfo> selectPage(SupplierInfo supplierInfo) {
        return supplierInfoMapper.selectPage(supplierInfo);
    }
}
